home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / t2win_32.zip / T2WDEMO1.BAS < prev    next >
BASIC Source File  |  1996-05-14  |  2KB  |  78 lines

  1. Attribute VB_Name = "T2WDEMO1_BAS"
  2. Option Explicit
  3.  
  4. Public Const RandI = 32767
  5. Public Const RandL = 2147483647
  6. Public Const RandS = 1E+10!
  7. Public Const RandD = 1E+16
  8.  
  9. Public T2WDirInst       As String
  10. Public T2WDirTest       As String
  11. Public T2WFileTest      As String
  12.  
  13.  
  14. Public Sub sub_Load_Combo(Cmb As Control, strFile As String)
  15.  
  16.    Dim intStatus        As Integer
  17.    
  18.    intStatus = cFileToComboBox(Cmb.hWnd, strFile)
  19.    
  20.    If (intStatus = False) Then
  21.       MsgBox ("File '" & strFile & "' can't be loaded !")
  22.       Exit Sub
  23.    End If
  24.    
  25.    Cmb.ListIndex = 0
  26.  
  27. End Sub
  28.  
  29. Public Sub sub_Initialization()
  30.  
  31.    Dim intResult     As Integer
  32.    Dim lngResult     As Long
  33.    
  34.    T2WDirTest = T2WDirInst + "directory for testing"
  35.    T2WFileTest = "autoexec.bat"
  36.    
  37.    intResult = cMakeDir(T2WDirTest)
  38.    
  39.    lngResult = cFileCopy("c:\autoexec.bat", T2WDirTest + "\" + T2WFileTest)
  40.    
  41.    If (lngResult = True) Then
  42.       MsgBox "Can't copy file [" & T2WFileTest & "] in directory [" & T2WDirTest & "]"
  43.    End If
  44.    
  45.    intResult = cChDir(T2WDirTest)
  46.    
  47. End Sub
  48.  
  49. Public Sub sub_Check_Project()
  50.  
  51.    T2WDirInst = App.Path + "\"
  52.    
  53.    If (cFilePathExists(T2WDirInst + "T2WIN-32.VBP") = False) Then
  54.       MsgBox "'TIME TO WIN (32-Bit)' demo not found" & vbCrLf & vbCrLf & "Place all demo files in the same directory"
  55.    End If
  56.  
  57. End Sub
  58.  
  59. Public Sub sub_NextPrev(Cmb As Control, Index As Integer)
  60.    
  61.    Dim n          As Integer
  62.    Dim t          As Integer
  63.    
  64.    n = Cmb.ListIndex
  65.    t = Cmb.ListCount - 1
  66.    
  67.    If (Index = 0) Then
  68.       n = n - 1
  69.       If (n < 0) Then n = 0
  70.    Else
  71.       n = n + 1
  72.       If (n > t) Then n = t
  73.    End If
  74.    
  75.    Cmb.ListIndex = n
  76.    
  77. End Sub
  78.